home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # prerm script for ttf-sazanami-gothic
- #
- # see: dh_installdeb(1)
-
- set -e
-
- ALT_NAME="ttf-japanese-mincho"
- FONT_ENTRY="/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf"
-
- # update font cache
- fontconfig_cache_update()
- {
- if [ -x /usr/bin/fc-cache ]; then
- fc-cache update
- fi
- }
-
- # summary of how this script can be called:
- # * <prerm> `remove'
- # * <old-prerm> `upgrade' <new-version>
- # * <new-prerm> `failed-upgrade' <old-version>
- # * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
- # * <deconfigured's-prerm> `deconfigure' `in-favour'
- # <package-being-installed> <version> `removing'
- # <conflicting-package> <version>
- # for details, see http://www.debian.org/doc/debian-policy/ or
- # the debian-policy package
-
-
- case "$1" in
- upgrade|deconfigure)
- fontconfig_cache_update
- ;;
- remove)
- # remove old ttf-japanese-gothic alternatives
- update-alternatives --remove $ALT_NAME $FONT_ENTRY
-
- # * remove not ".ttf" postfix file
- if [ -f /usr/share/fonts/truetype/$ALT_NAME ]; then
- rm /usr/share/fonts/truetype/$ALT_NAME
- fi
-
- # alternative
- update-alternatives --remove $ALT_NAME.ttf $FONT_ENTRY
-
- fontconfig_cache_update
- ;;
- failed-upgrade)
- ;;
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 1
- ;;
- esac
-
- # dh_installdeb will replace this with shell code automatically
- # generated by other debhelper scripts.
-
- # Automatically added by dh_installdefoma
- FILE='/etc/defoma/hints/ttf-sazanami-mincho.hints'
- if [ "$1" = remove ]; then
- test -x /usr/bin/defoma-font && /usr/bin/defoma-font purge-all $FILE
- fi
- # End automatically added section
-
-
- exit 0
-
-
-
-
-